/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * insumos_salidas_catalogo.java
 *
 * Created on 6/04/2011, 10:37:47 AM
 */

package sie_invdis;


import java.sql.*;
import javax.swing.*;
import java.awt.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Calendar;
import java.text.*;
import java.text.ParseException;

/**
 *
 * @author Michelle
 */
public class insumos_salidas_catalogo extends javax.swing.JFrame {


    private javax.swing.table.DefaultTableModel jtable_modelo;
    private JTable jtable_tiendas;

    private int buscamp=1;

    private int control_enter=0,controlcombo=0,controlcomboinsu=0;
    private SimpleDateFormat formateador = new SimpleDateFormat("dd-MM-yyyy");
    private SimpleDateFormat formateadoresta = new SimpleDateFormat("yyyy-MM-dd");
    //se crea intancia de la clase conexion
    bd_conexion x = new bd_conexion() ;
       //se creaa la variable resultset
    ResultSet rs = null;
       //llamo almetodo para establecer la conexion
    /** Creates new form insumos_salidas_catalogo */
    public insumos_salidas_catalogo() {
    this.iniciar_modelo_de_tabla();
     initComponents();
    jt_catalogo_insumos_requi.getColumnModel().getColumn(0).setPreferredWidth(50);//status
    jt_catalogo_insumos_requi.getColumnModel().getColumn(1).setPreferredWidth(30);//Folio
    jt_catalogo_insumos_requi.getColumnModel().getColumn(2).setPreferredWidth(50);//status
    jt_catalogo_insumos_requi.getColumnModel().getColumn(3).setPreferredWidth(30);//doc ant.
    jt_catalogo_insumos_requi.getColumnModel().getColumn(4).setPreferredWidth(45);//fecha
    jt_catalogo_insumos_requi.getColumnModel().getColumn(5).setPreferredWidth(45);//fecha llega tienda
    jt_catalogo_insumos_requi.getColumnModel().getColumn(6).setPreferredWidth(45);//f.recepcion
    jt_catalogo_insumos_requi.getColumnModel().getColumn(7).setPreferredWidth(40);//Dias Trans.
    jt_catalogo_insumos_requi.getColumnModel().getColumn(8).setPreferredWidth(70);//Cliente
    jt_catalogo_insumos_requi.getColumnModel().getColumn(9).setPreferredWidth(20);//piezas
    jt_catalogo_insumos_requi.getColumnModel().getColumn(10).setPreferredWidth(80);//Observaciones

    jt_catalogo_insumos_requi.getTableHeader().setBackground(Color.yellow);
    this.jtf_busqueda.requestFocus();
    this.cambiartamanofilas();
    this.loadcombodepa();
    this.loadcombotipoinsu();
    this.carga_datos(5,"");
    this.cambiartamanofilas();
    controlcombo=1;
    controlcomboinsu=1;
    this.buttonGroup1.setSelected(jrbtn_folio.getModel(), true);
    }
  private void iniciar_modelo_de_tabla()
    {

        jtable_modelo=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo.addColumn("<html><b>Almacen</b></html>");
        jtable_modelo.addColumn("<html><b>Folio</b></html>");
        jtable_modelo.addColumn("<html><b>Status</b></html>");
        jtable_modelo.addColumn("<html><b>Doc. Ant.</b></html>");
        jtable_modelo.addColumn("<html><b>Fecha</b></html>");
        jtable_modelo.addColumn("<html><b>F.llega Tienda</b></html>");
        jtable_modelo.addColumn("<html><b>F.Recepcion</b></html>");
        jtable_modelo.addColumn("<html><b>Dias Trans.</b></html>");
        jtable_modelo.addColumn("<html><b>Cliente/Departamento</b></html>");
        jtable_modelo.addColumn("<html><b>Piezas</b></html>");
        jtable_modelo.addColumn("<html><b>Observaciones</b></html>");
        jtable_modelo.addColumn("<html><b>Tipo</b></html>");


   }

private void carga_datos(int opbus,String tbusca)
    {
      String fechacat = "",fechallegatienda="",fechaentrega="";
      DecimalFormat miformat = new DecimalFormat("###,###,###,###");
      this.LimpiarJTable();
      Object[] fnewRow = new Object[12];
       //invoco al metodo que trae el recordset de datos
      String texto="select * from x1distribucion_insumos_salidas_catalogov2('"+variables_global.getcliente_tistribucion()+"',"+opbus+",'"+tbusca+"',"+Integer.valueOf(variables_global.getdepartamento())+") as (idreg integer,iddocto character varying(12),idesta smallint,desta character varying(15), claveperdoc character varying(16), doc_anterior character varying(12),doc_sig character varying(12),fedoc date,feent date,fechaven date,impu numeric, impu2 numeric,desctotal numeric,descfinan numeric,idclie character varying(12),nomclie character varying(60),obserdoc character varying(80),usuario character varying(20),hora text,alma smallint,depa smallint,descripalma character varying(30),descripdepa character varying(30), tpz numeric,totcosto numeric,totprecio numeric,idtipo smallint,idconsiga integer,nombreconsigando text,describetipoinsu character varying(40));";
      System.out.println(texto);
        try
         {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            while (rs.next())
                {
                 fnewRow[0]=rs.getString ("descripalma");
                 fnewRow[1]=rs.getString ("iddocto");
                 fnewRow[2]=rs.getString ("idesta")+":"+rs.getString ("desta");
                 fnewRow[3]=rs.getString ("doc_anterior");

                 fnewRow[4]="<html>"+this.fechaeuropea(rs.getString ("fedoc"))+":<br>"+DiaSemana(this.fechaeuropea(rs.getString ("fedoc")))+" "+rs.getString ("hora")+"</html>";
                 if(rs.getString("feent") != null)
                        {
                           fechallegatienda="<html>"+ rs.getString("feent")+":<br>"+DiaSemana(rs.getString ("feent"))+"</html>";
                        }
                
                 fnewRow[5]=fechallegatienda;
                 if(rs.getString("fechaven") != null )
                        {
                            fechaentrega="<html>"+rs.getString ("fechaven")+":<br>"+this.DiaSemana(rs.getString("fechaven"))+"</html>";
                        }
                 fnewRow[6]=fechaentrega;
                
                 fnewRow[7]="";
                 fnewRow[8]=rs.getString ("descripdepa");
                 //fnewRow[9]=miformat.format(rs.getFloat("tpz"));
                 fnewRow[9]=rs.getString("tpz");
                  
                 fnewRow[10]=rs.getString ("obserdoc");
                 fnewRow[11]=rs.getString ("describetipoinsu");

                 //System.out.println("paso aqui en error 2");

                 jtable_modelo.addRow(fnewRow);
               
                }

        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
          
        }
        this.registrosobtenidos();

      }
void registrosobtenidos()
 {
     //limpiar la tabla
    this.jlbl_cantidadregistros.setText(String.valueOf(this.jtable_modelo.getRowCount()));
    this.jlbl_textobuscado.setText(this.jtf_busqueda.getText().toUpperCase().trim());
 }
private String  fechaeuropea(String fecha) {

         //resibe cadena de fecha en formato americano yyyy-MM-dd
        java.util.Date fechaestaeuropa=null;
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("dd-MM-yyyy");
       String cadenafecha="";
        try
         {
          fechaestaeuropa = formateadoresta.parse(fecha);
         }
        catch (ParseException e)
          {
             //Error, la cadena de texto no se puede convertir en fecha.
          }
       cadenafecha= formateadorestaeuropa.format(fechaestaeuropa);
       return cadenafecha;

    }
private String DiaSemana(String fe) {
         String dia = "";
       java.util.Date fecha=null;
         try
            {
             fecha = formateador.parse(fe);

           }
        catch (ParseException e)
            {
            //Error, la cadena de texto no se puede convertir en fecha.
            }
        Calendar cal= Calendar.getInstance();
        cal.setTime(fecha);
        //ojo para establecer o recetear cada parte de la fecha por separado
        //cal.set(Calendar.YEAR, fecha.getYear());
        //cal.set(Calendar.MONTH, fecha.getMonth());
        //cal.set(Calendar.DAY_OF_MONTH, fecha.getDay());
        int diaInt = cal.get(Calendar.DAY_OF_WEEK);
        switch (diaInt) {
            case 1:
                dia = "Domingo";
                break;
            case 2:
                dia = "Lunes";
                break;
            case 3:
                dia = "Martes";
                break;
            case 4:
                dia = "Miercoles";
                break;
            case 5:
                dia = "Jueves";
                break;
            case 6:
                dia = "Viernes";
                break;
            case 7:
                dia = "Sabado";
                break;

        }
        return dia;
    }
private void loadcombodepa()
    {
            this.jcbx_departamentos.addItem(variables_global.getdepartamento()+":"+variables_global.getdepartamento_des());
            try
            {
                    rs = x.sieuno_executediversosv2("select * from x1_supervision_tareas_departamentos() as (id smallint,descrip character varying(80));",variables_global.getconexiongral());
               while (rs.next())
                    {
                      this.jcbx_departamentos.addItem(rs.getString("id")+":"+rs.getString("descrip"));
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }
private void loadcombotipoinsu(){
          rs = x.sieuno_executediversosv2("select * from x1distribucion_insumos_tipos() as (id smallint, descrip character varying(40));",variables_global.getconexiongral());
            try
            {
               while (rs.next())
                    {
                      this.jcbx_tipoinsumo.addItem(rs.getString("id")+":"+rs.getString("descrip"));
                    }
             }
            catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
    }
private void dioclick(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
        System.out.println("dio doble  click");
        int fila = jt_catalogo_insumos_requi.getSelectedRow();
        JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();
        insumos_salidas_detalle fdsi=new insumos_salidas_detalle(mainFrame,true,jt_catalogo_insumos_requi.getValueAt(fila, 1).toString());
        fdsi.pack();
        fdsi.setVisible(true);
    }


    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        jbtn_salir = new javax.swing.JButton();
        jbtn_add_art = new javax.swing.JButton();
        jbtn_actualizar = new javax.swing.JButton();
        jbtn_generarcxc = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        jbtn_compras = new javax.swing.JButton();
        jbtn_movimientosinve = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jbtn_helayudame = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jcbx_departamentos = new javax.swing.JComboBox();
        jtf_busqueda = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jbtn_busqueda = new javax.swing.JButton();
        jrbtn_folio = new javax.swing.JRadioButton();
        jrbtn_doctoanterio = new javax.swing.JRadioButton();
        jrbtn_obserdocto = new javax.swing.JRadioButton();
        jrbtn_departamento = new javax.swing.JRadioButton();
        jcbx_filtrarpendientes = new javax.swing.JCheckBox();
        jLabel3 = new javax.swing.JLabel();
        jcbx_tipoinsumo = new javax.swing.JComboBox();
        jrbtn_tipoinsumo = new javax.swing.JRadioButton();
        jPanel4 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jt_catalogo_insumos_requi = new javax.swing.JTable()
        {
            public boolean isCellEditable(int rowIndex, int mColIndex) {
                return false;
            }
        };
        ;
        jLabel4 = new javax.swing.JLabel();
        jlbl_textobuscado = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jlbl_cantidadregistros = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jmni_salir = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jmni_actualizar = new javax.swing.JMenuItem();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(sie_invdis.Sie_invdisApp.class).getContext().getResourceMap(insumos_salidas_catalogo.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N

        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel1.setName("jPanel1"); // NOI18N

        jbtn_salir.setIcon(resourceMap.getIcon("jbtn_salir.icon")); // NOI18N
        jbtn_salir.setText(resourceMap.getString("jbtn_salir.text")); // NOI18N
        jbtn_salir.setName("jbtn_salir"); // NOI18N
        jbtn_salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_salirActionPerformed(evt);
            }
        });

        jbtn_add_art.setIcon(resourceMap.getIcon("jbtn_add_art.icon")); // NOI18N
        jbtn_add_art.setText(resourceMap.getString("jbtn_add_art.text")); // NOI18N
        jbtn_add_art.setName("jbtn_add_art"); // NOI18N
        jbtn_add_art.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_add_artActionPerformed(evt);
            }
        });

        jbtn_actualizar.setIcon(resourceMap.getIcon("jbtn_actualizar.icon")); // NOI18N
        jbtn_actualizar.setText(resourceMap.getString("jbtn_actualizar.text")); // NOI18N
        jbtn_actualizar.setToolTipText(resourceMap.getString("jbtn_actualizar.toolTipText")); // NOI18N
        jbtn_actualizar.setName("jbtn_actualizar"); // NOI18N
        jbtn_actualizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_actualizarActionPerformed(evt);
            }
        });

        jbtn_generarcxc.setIcon(resourceMap.getIcon("jbtn_generarcxc.icon")); // NOI18N
        jbtn_generarcxc.setText(resourceMap.getString("jbtn_generarcxc.text")); // NOI18N
        jbtn_generarcxc.setName("jbtn_generarcxc"); // NOI18N
        jbtn_generarcxc.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_generarcxcActionPerformed(evt);
            }
        });

        jButton1.setIcon(resourceMap.getIcon("jButton1.icon")); // NOI18N
        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setToolTipText(resourceMap.getString("jButton1.toolTipText")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jbtn_compras.setIcon(resourceMap.getIcon("jbtn_compras.icon")); // NOI18N
        jbtn_compras.setText(resourceMap.getString("jbtn_compras.text")); // NOI18N
        jbtn_compras.setName("jbtn_compras"); // NOI18N
        jbtn_compras.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_comprasActionPerformed(evt);
            }
        });

        jbtn_movimientosinve.setIcon(resourceMap.getIcon("jbtn_movimientosinve.icon")); // NOI18N
        jbtn_movimientosinve.setText(resourceMap.getString("jbtn_movimientosinve.text")); // NOI18N
        jbtn_movimientosinve.setName("jbtn_movimientosinve"); // NOI18N
        jbtn_movimientosinve.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_movimientosinveActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jbtn_add_art)
                .addGap(18, 18, 18)
                .addComponent(jbtn_actualizar)
                .addGap(18, 18, 18)
                .addComponent(jbtn_generarcxc)
                .addGap(33, 33, 33)
                .addComponent(jButton1)
                .addGap(27, 27, 27)
                .addComponent(jbtn_compras)
                .addGap(38, 38, 38)
                .addComponent(jbtn_movimientosinve)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)
                .addComponent(jbtn_salir)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jbtn_add_art)
                .addComponent(jbtn_salir)
                .addComponent(jbtn_actualizar)
                .addComponent(jButton1)
                .addComponent(jbtn_generarcxc)
                .addComponent(jbtn_compras)
                .addComponent(jbtn_movimientosinve))
        );

        jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel2.setName("jPanel2"); // NOI18N

        jbtn_helayudame.setText(resourceMap.getString("jbtn_helayudame.text")); // NOI18N
        jbtn_helayudame.setName("jbtn_helayudame"); // NOI18N
        jbtn_helayudame.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_helayudameActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap(864, Short.MAX_VALUE)
                .addComponent(jbtn_helayudame))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jbtn_helayudame)
        );

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel3.border.title"))); // NOI18N
        jPanel3.setName("jPanel3"); // NOI18N

        jcbx_departamentos.setToolTipText(resourceMap.getString("jcbx_departamentos.toolTipText")); // NOI18N
        jcbx_departamentos.setName("jcbx_departamentos"); // NOI18N
        jcbx_departamentos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcbx_departamentosActionPerformed(evt);
            }
        });

        jtf_busqueda.setToolTipText(resourceMap.getString("jtf_busqueda.toolTipText")); // NOI18N
        jtf_busqueda.setName("jtf_busqueda"); // NOI18N
        jtf_busqueda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_busquedaActionPerformed(evt);
            }
        });

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        jbtn_busqueda.setText(resourceMap.getString("jbtn_busqueda.text")); // NOI18N
        jbtn_busqueda.setToolTipText(resourceMap.getString("jbtn_busqueda.toolTipText")); // NOI18N
        jbtn_busqueda.setName("jbtn_busqueda"); // NOI18N
        jbtn_busqueda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_busquedaActionPerformed(evt);
            }
        });

        buttonGroup1.add(jrbtn_folio);
        jrbtn_folio.setText(resourceMap.getString("jrbtn_folio.text")); // NOI18N
        jrbtn_folio.setToolTipText(resourceMap.getString("jrbtn_folio.toolTipText")); // NOI18N
        jrbtn_folio.setActionCommand(resourceMap.getString("jrbtn_folio.actionCommand")); // NOI18N
        jrbtn_folio.setName("jrbtn_folio"); // NOI18N
        jrbtn_folio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrbtn_folioActionPerformed(evt);
            }
        });

        buttonGroup1.add(jrbtn_doctoanterio);
        jrbtn_doctoanterio.setText(resourceMap.getString("jrbtn_doctoanterio.text")); // NOI18N
        jrbtn_doctoanterio.setToolTipText(resourceMap.getString("jrbtn_doctoanterio.toolTipText")); // NOI18N
        jrbtn_doctoanterio.setActionCommand(resourceMap.getString("jrbtn_doctoanterio.actionCommand")); // NOI18N
        jrbtn_doctoanterio.setName("jrbtn_doctoanterio"); // NOI18N
        jrbtn_doctoanterio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrbtn_doctoanterioActionPerformed(evt);
            }
        });

        buttonGroup1.add(jrbtn_obserdocto);
        jrbtn_obserdocto.setText(resourceMap.getString("jrbtn_obserdocto.text")); // NOI18N
        jrbtn_obserdocto.setToolTipText(resourceMap.getString("jrbtn_obserdocto.toolTipText")); // NOI18N
        jrbtn_obserdocto.setActionCommand(resourceMap.getString("jrbtn_obserdocto.actionCommand")); // NOI18N
        jrbtn_obserdocto.setName("jrbtn_obserdocto"); // NOI18N
        jrbtn_obserdocto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrbtn_obserdoctoActionPerformed(evt);
            }
        });

        buttonGroup1.add(jrbtn_departamento);
        jrbtn_departamento.setText(resourceMap.getString("jrbtn_departamento.text")); // NOI18N
        jrbtn_departamento.setToolTipText(resourceMap.getString("jrbtn_departamento.toolTipText")); // NOI18N
        jrbtn_departamento.setActionCommand(resourceMap.getString("jrbtn_departamento.actionCommand")); // NOI18N
        jrbtn_departamento.setName("jrbtn_departamento"); // NOI18N
        jrbtn_departamento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrbtn_departamentoActionPerformed(evt);
            }
        });

        jcbx_filtrarpendientes.setText(resourceMap.getString("jcbx_filtrarpendientes.text")); // NOI18N
        jcbx_filtrarpendientes.setToolTipText(resourceMap.getString("jcbx_filtrarpendientes.toolTipText")); // NOI18N
        jcbx_filtrarpendientes.setName("jcbx_filtrarpendientes"); // NOI18N
        jcbx_filtrarpendientes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcbx_filtrarpendientesActionPerformed(evt);
            }
        });

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jcbx_tipoinsumo.setName("jcbx_tipoinsumo"); // NOI18N
        jcbx_tipoinsumo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcbx_tipoinsumoActionPerformed(evt);
            }
        });

        buttonGroup1.add(jrbtn_tipoinsumo);
        jrbtn_tipoinsumo.setText(resourceMap.getString("jrbtn_tipoinsumo.text")); // NOI18N
        jrbtn_tipoinsumo.setActionCommand(resourceMap.getString("jrbtn_tipoinsumo.actionCommand")); // NOI18N
        jrbtn_tipoinsumo.setName("jrbtn_tipoinsumo"); // NOI18N
        jrbtn_tipoinsumo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrbtn_tipoinsumoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jtf_busqueda, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbtn_busqueda)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jcbx_departamentos, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel3))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addContainerGap(158, Short.MAX_VALUE)
                        .addComponent(jrbtn_folio, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jrbtn_doctoanterio)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jrbtn_obserdocto)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jrbtn_departamento, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jrbtn_tipoinsumo)
                        .addGap(126, 126, 126)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jcbx_tipoinsumo, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jcbx_filtrarpendientes)))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtf_busqueda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2)
                    .addComponent(jcbx_departamentos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1)
                    .addComponent(jbtn_busqueda)
                    .addComponent(jLabel3)
                    .addComponent(jcbx_tipoinsumo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jrbtn_doctoanterio, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jrbtn_obserdocto, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jrbtn_departamento, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jrbtn_folio, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jcbx_filtrarpendientes)
                    .addComponent(jrbtn_tipoinsumo))
                .addContainerGap(8, Short.MAX_VALUE))
        );

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel4.border.title"))); // NOI18N
        jPanel4.setName("jPanel4"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jt_catalogo_insumos_requi.setModel(this.jtable_modelo);
        jt_catalogo_insumos_requi.setName("jt_catalogo_insumos_requi"); // NOI18N
        jt_catalogo_insumos_requi.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jt_catalogo_insumos_requiMouseClicked(evt);

                if(evt.getClickCount() >= 2)
                {
                    dioclick(evt);
                    //System.out.println(" double click" );

                }
            }
        });
        jScrollPane1.setViewportView(jt_catalogo_insumos_requi);

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        jlbl_textobuscado.setFont(resourceMap.getFont("jlbl_textobuscado.font")); // NOI18N
        jlbl_textobuscado.setText(resourceMap.getString("jlbl_textobuscado.text")); // NOI18N
        jlbl_textobuscado.setName("jlbl_textobuscado"); // NOI18N

        jLabel5.setFont(resourceMap.getFont("jLabel5.font")); // NOI18N
        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        jlbl_cantidadregistros.setFont(resourceMap.getFont("jlbl_cantidadregistros.font")); // NOI18N
        jlbl_cantidadregistros.setText(resourceMap.getString("jlbl_cantidadregistros.text")); // NOI18N
        jlbl_cantidadregistros.setName("jlbl_cantidadregistros"); // NOI18N

        jLabel6.setFont(resourceMap.getFont("jLabel6.font")); // NOI18N
        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 917, Short.MAX_VALUE)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addComponent(jLabel4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jlbl_textobuscado, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel5)
                .addGap(18, 18, 18)
                .addComponent(jlbl_cantidadregistros, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel6)
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(jlbl_cantidadregistros)
                    .addComponent(jLabel5)
                    .addComponent(jLabel4)
                    .addComponent(jlbl_textobuscado))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jMenuBar1.setName("jMenuBar1"); // NOI18N

        jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N
        jMenu1.setName("jMenu1"); // NOI18N

        jmni_salir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK));
        jmni_salir.setIcon(resourceMap.getIcon("jmni_salir.icon")); // NOI18N
        jmni_salir.setText(resourceMap.getString("jmni_salir.text")); // NOI18N
        jmni_salir.setName("jmni_salir"); // NOI18N
        jmni_salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_salirActionPerformed(evt);
            }
        });
        jMenu1.add(jmni_salir);

        jMenuBar1.add(jMenu1);

        jMenu2.setText(resourceMap.getString("jMenu2.text")); // NOI18N
        jMenu2.setName("jMenu2"); // NOI18N

        jmni_actualizar.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5, 0));
        jmni_actualizar.setIcon(resourceMap.getIcon("jmni_actualizar.icon")); // NOI18N
        jmni_actualizar.setText(resourceMap.getString("jmni_actualizar.text")); // NOI18N
        jmni_actualizar.setName("jmni_actualizar"); // NOI18N
        jmni_actualizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_actualizarActionPerformed(evt);
            }
        });
        jMenu2.add(jmni_actualizar);

        jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0));
        jMenuItem1.setText(resourceMap.getString("jMenuItem1.text")); // NOI18N
        jMenuItem1.setName("jMenuItem1"); // NOI18N
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem1);

        jMenuBar1.add(jMenu2);

        jMenu3.setText(resourceMap.getString("jMenu3.text")); // NOI18N
        jMenu3.setName("jMenu3"); // NOI18N
        jMenuBar1.add(jMenu3);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jbtn_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_salirActionPerformed
        // TODO add your handling code here:
       // x.cierraConexion();   // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Desea Salir?")==0)
            {
                this.dispose();
            }
}//GEN-LAST:event_jbtn_salirActionPerformed

    private void jbtn_add_artActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_add_artActionPerformed
        // TODO add your handling code here:
//        JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();
  //      articulos_sie_add faa=new articulos_sie_add(mainFrame,true);
  //      faa.setVisible(true);
             JFrame mainFrame = Sie_invdisApp.getApplication().getMainFrame();
        insumos_salidas_agregar fisa=new insumos_salidas_agregar(mainFrame,true);
        fisa.setVisible(true);
}//GEN-LAST:event_jbtn_add_artActionPerformed

    private void jbtn_helayudameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_helayudameActionPerformed
        // TODO add your handling code here:
        this.ayuda();
}//GEN-LAST:event_jbtn_helayudameActionPerformed

    private void jcbx_departamentosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_departamentosActionPerformed
        // TODO add your handling code here:
 

     
            if (controlcombo > 0 ) {
                        if(JOptionPane.showConfirmDialog(null, "Estan Correctos sus Datos?")==0) {
                        String arreglo_depa[]=this.jcbx_departamentos.getSelectedItem().toString().split(":");
                        this.buttonGroup1.setSelected(jrbtn_departamento.getModel(), true);
                        buscamp=4;
                        this.jtf_busqueda.setText(arreglo_depa[0]);
                        this.jbtn_busquedaActionPerformed(evt);
                        this.cambiartamanofilas();
                }
            }
       

        //this.jtfpruebados.setText(jtable_tiendas.getValueAt(indeceta, 0).toString());
}//GEN-LAST:event_jcbx_departamentosActionPerformed

    private void jtf_busquedaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_busquedaActionPerformed
        // TODO add your handling code here:
        this.jbtn_busquedaActionPerformed(evt);
}//GEN-LAST:event_jtf_busquedaActionPerformed

    private void jbtn_busquedaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_busquedaActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Estan correcto sus Datos?")==0) {
            this.carga_datos(buscamp,this.jtf_busqueda.getText().toUpperCase());
            this.cambiartamanofilas();
        }
    }//GEN-LAST:event_jbtn_busquedaActionPerformed

    private void jrbtn_folioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_folioActionPerformed
        // TODO add your handling code here:
        buscamp=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_folioActionPerformed

    private void jrbtn_doctoanterioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_doctoanterioActionPerformed
        // TODO add your handling code here:
        buscamp=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_doctoanterioActionPerformed

    private void jrbtn_obserdoctoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_obserdoctoActionPerformed
        // TODO add your handling code here:
        buscamp=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_obserdoctoActionPerformed

    private void jrbtn_departamentoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_departamentoActionPerformed
        // TODO add your handling code here:
        buscamp=Integer.parseInt(evt.getActionCommand().toString());
}//GEN-LAST:event_jrbtn_departamentoActionPerformed

    private void jbtn_actualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_actualizarActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Estan correcto sus Datos?")==0) {
            this.carga_datos(0,"");
            this.cambiartamanofilas();
        }
    }//GEN-LAST:event_jbtn_actualizarActionPerformed

    private void jcbx_filtrarpendientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_filtrarpendientesActionPerformed
        // TODO add your handling code here:
        if(JOptionPane.showConfirmDialog(null, "Deseas Ver solo Recepciones Pendientes?")==0) {
            this.carga_datos(5,"");
            this.cambiartamanofilas();
        }
}//GEN-LAST:event_jcbx_filtrarpendientesActionPerformed

    private void jmni_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_salirActionPerformed
        // TODO add your handling code here:
        this.jbtn_salirActionPerformed(evt);
    }//GEN-LAST:event_jmni_salirActionPerformed

    private void jbtn_generarcxcActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_generarcxcActionPerformed
        // TODO add your handling code here:
        insumos_salidas_consignadocxc fiscxc=new insumos_salidas_consignadocxc();
        fiscxc.pack();
        fiscxc.setVisible(true);
    }//GEN-LAST:event_jbtn_generarcxcActionPerformed

    private void jmni_actualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_actualizarActionPerformed
        // TODO add your handling code here:
        this.jbtn_actualizarActionPerformed(evt);
    }//GEN-LAST:event_jmni_actualizarActionPerformed

    private void jcbx_tipoinsumoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_tipoinsumoActionPerformed
        // TODO add your handling code here:
         if (controlcomboinsu > 0 ) {
                       
                        String arreglo_tipoinsu[]=this.jcbx_tipoinsumo.getSelectedItem().toString().split(":");
                        this.buttonGroup1.setSelected(jrbtn_tipoinsumo.getModel(), true);
                        buscamp=6;
                        this.jtf_busqueda.setText(arreglo_tipoinsu[0]);
                        this.jbtn_busquedaActionPerformed(evt);
                        this.cambiartamanofilas();
                
            }
    }//GEN-LAST:event_jcbx_tipoinsumoActionPerformed

    private void jrbtn_tipoinsumoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbtn_tipoinsumoActionPerformed
        // TODO add your handling code here:
           buscamp=Integer.parseInt(evt.getActionCommand().toString());
    }//GEN-LAST:event_jrbtn_tipoinsumoActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
         insumos_articulos_catalogo fiac=new insumos_articulos_catalogo();
        fiac.pack();
        fiac.setVisible(true);
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        // TODO add your handling code here:
        this.jmni_salirActionPerformed(evt);
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jbtn_comprasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_comprasActionPerformed
        // TODO add your handling code here:
        insumos_entradas_catalogo fiec=new insumos_entradas_catalogo();
        fiec.pack();
        fiec.setVisible(true);
}//GEN-LAST:event_jbtn_comprasActionPerformed

    private void jbtn_movimientosinveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_movimientosinveActionPerformed
        // TODO add your handling code here:
        insumos_articulos_movi_inve fiami=new insumos_articulos_movi_inve();
        fiami.pack();
        fiami.setVisible(true);
    }//GEN-LAST:event_jbtn_movimientosinveActionPerformed
    private void jt_catalogo_insumos_requiMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }

    void LimpiarJTable()
 {
     //limpiar la tabla
    while(jtable_modelo.getRowCount()>0)jtable_modelo.removeRow(0);
 }
  void cambiartamanofilas()
 {
     //limpiar la tabla
       int numerofilas=this.jtable_modelo.getRowCount();
             for(int i = 0 ;i < numerofilas; i++)
                {
                     jt_catalogo_insumos_requi.setRowHeight(i, 30);
                }
  }
   
    private  void ayuda()
            {
                String punto1="1.-Detalle de Recepcion de Mercancia, cada opcion se autodescribe brevemente\n";
                String punto2="  2.- Cada Boton tiene Una letra Resaltada el cual indica su metodo abreviado uselo si desea mayor rapides ( ejemplo Alt+a tendra ayuda automaticamente)\n";
                String punto3="  3.- la opcion guardar esta activada para Recepcionar este documento Incluyendo Diferencias si no ingresa diferencias, el sistema guardara el documento como correcto\n";
                JOptionPane.showMessageDialog(null,punto1+punto2+punto3, "Sistema Integral(Detalle Recepcion) : Ayuda",1);
            }
    


    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new insumos_salidas_catalogo().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JButton jbtn_actualizar;
    private javax.swing.JButton jbtn_add_art;
    private javax.swing.JButton jbtn_busqueda;
    private javax.swing.JButton jbtn_compras;
    private javax.swing.JButton jbtn_generarcxc;
    private javax.swing.JButton jbtn_helayudame;
    private javax.swing.JButton jbtn_movimientosinve;
    private javax.swing.JButton jbtn_salir;
    private javax.swing.JComboBox jcbx_departamentos;
    private javax.swing.JCheckBox jcbx_filtrarpendientes;
    private javax.swing.JComboBox jcbx_tipoinsumo;
    private javax.swing.JLabel jlbl_cantidadregistros;
    private javax.swing.JLabel jlbl_textobuscado;
    private javax.swing.JMenuItem jmni_actualizar;
    private javax.swing.JMenuItem jmni_salir;
    private javax.swing.JRadioButton jrbtn_departamento;
    private javax.swing.JRadioButton jrbtn_doctoanterio;
    private javax.swing.JRadioButton jrbtn_folio;
    private javax.swing.JRadioButton jrbtn_obserdocto;
    private javax.swing.JRadioButton jrbtn_tipoinsumo;
    private javax.swing.JTable jt_catalogo_insumos_requi;
    private javax.swing.JTextField jtf_busqueda;
    // End of variables declaration//GEN-END:variables

}
